import EventRoute from "./EventRoute"
import SystemMemberGradeService from "../service/SystemMemberGradeService";

const routes = new Array();
const systemMemberGradeService = new SystemMemberGradeService();
/**
 * 会员等级分页
 */
routes.push(
    new EventRoute('app-memberlevel-page', 'event', async (api, data = {}) => {
        systemMemberGradeService.page(data.data)
    })
)

/**
 * 会员等级添加
 */
routes.push(
    new EventRoute('app-memberlevel-add', 'event', async (api, data = {}) => {
        systemMemberGradeService.save(data.data)
    })
)

/**
 * 会员等级修改
 */
routes.push(
    new EventRoute('app-memberlevel-update', 'event', async (api, data = {}) => {
        systemMemberGradeService.updateById(data.data)
    })
)

/**
 * 会员等级删除
 */
routes.push(
    new EventRoute('app-memberlevel-delete', 'event', async (api, data = {}) => {
        systemMemberGradeService.deleteById(data.data)
    })
)

/**
 * 所有会员等级
 */
routes.push(
    new EventRoute('app-memberlevel-all', 'event', async (api, data = {}) => {
        systemMemberGradeService.all(data.data)
    })
)

export default routes;
